package com.shell.provider;

import com.shell.governor.modules.po.PubAttTmpl;
import com.shell.governor.modules.service.PubAttTmplService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PubAttTmplProvider {
	@Autowired
	private PubAttTmplService pubAttTmplService;

	@RequestMapping({ "/pub-att-tmpl/getPubAttTmplByTypeAndGrpId" })
	public PubAttTmpl getPubAttTmplByTypeAndGrpId(@RequestParam("tmplType") String tmplType,
			@RequestParam(value = "grpId", required = false) String grpId) {
		return this.pubAttTmplService.selectTmplByGpAndType(grpId, tmplType);
	}
}
